<?php
class Default_Service_Common
{
     public static function getIP(){
          if (@$_SERVER['HTTP_CLIENT_IP'] && @$_SERVER['HTTP_CLIENT_IP']!='unknown') {
			$ip = $_SERVER['HTTP_CLIENT_IP'];
		  } elseif (@$_SERVER['HTTP_X_FORWARDED_FOR'] && @$_SERVER['HTTP_X_FORWARDED_FOR']!='unknown') {
		   $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
		  } else {
		   $ip = $_SERVER['REMOTE_ADDR'];
		  }
		  return $ip;
	} 
}